package t10086.Toolkit;

import java.util.Arrays;
import java.util.List;
import java.util.Random;
import java.util.UUID;

public class StringTool {
    public  String generateRandomDigits(int n) {
        String uuid = UUID.randomUUID().toString().replaceAll("[^0-9]", ""); // 去掉所有非数字字符
        return uuid.substring(0, Math.min(n, uuid.length())); // 确保长度不超过 n
    }
    private static final List<String> surnames = Arrays.asList(
            "李", "王", "张", "刘", "陈", "杨", "赵", "黄", "周", "吴"
    );

    private static final List<String> firstNames = Arrays.asList(
            "伟", "强", "洋", "磊", "军", "洋", "鹏", "杰", "涛", "超"
    );

    private static final Random random = new Random();

    public  String generateChineseName() {
        String surname = surnames.get(random.nextInt(surnames.size()));
        String firstName = firstNames.get(random.nextInt(firstNames.size()));
        return surname + firstName;
    }
    public int getIntRandom(int min, int max) {
        return random.nextInt(max - min) + min;
    }
}
